{% extends 'base.html' %}
{% block header %}资费包管理{% endblock %}
{% block content %}
<div class="card shadow-sm rounded p-4 mb-4">
    <div class="d-flex justify-content-between align-items-center mb-3">
        <h4 class="mb-0">资费包列表</h4>
        <a href="/package/create/" class="btn btn-success">新增资费包</a>
    </div>
    <div class="table-responsive">
        <table class="table table-bordered align-middle">
            <thead class="table-light">
                <tr>
                    <th>名称</th>
                    <th>描述</th>
                    <th>价格</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {% for package in packages %}
                <tr>
                    <td>{{ package.name }}</td>
                    <td>{{ package.description }}</td>
                    <td>{{ package.price }}</td>
                    <td>{{ package.remark }}</td>
                    <td>
                        <a href="/package/edit/{{ package.id }}/" class="btn btn-sm btn-primary">编辑</a>
                        <a href="/package/delete/{{ package.id }}/" class="btn btn-sm btn-danger ms-1">删除</a>
                    </td>
                </tr>
                {% empty %}
                <tr><td colspan="5" class="text-center">暂无资费包信息</td></tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endblock %}
